<?php
/**
 * @copyright   Copyright (c) 2017 https://www.sapixx.com All rights reserved.
 * @license     Licensed (http://www.apache.org/licenses/LICENSE-2.0).
 * @author      pillar<ltmn@qq.com>
 * 知识库
 */
namespace app\bestbao\model;
use think\Model;

class BestbaoConfig extends Model{

    //读取小程序列表
    public static function MiniappLists(){
        return self::view('member_miniapp','id,appname,miniapp_id,create_time,is_lock')
            ->view('miniapp','miniapp_dir','member_miniapp.miniapp_id = miniapp.id','LEFT')
            ->view('bestbao_config','type,price','bestbao_config.member_miniapp_id = member_miniapp.id','LEFT')
            ->where(['miniapp.miniapp_dir' => 'bestbao'])
            ->order('id desc')->paginate(20);
    }
}